/*
 *  $Id: PurityKnight.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Light.Creatures {
    public class PurityKnight: CreatureCard {
        public PurityKnight(): base("001_l_c_purity_knight") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Light;
            Value = 100;
            Damage = 2;
            Health = 4;
            AddManaCost(ElementType.Light, 3);
        }
        public override void SetAbilities(ICollector<AbilityCard> abilities) {
            abilities.Add<Abilities.Pray>();
        }
        public override void SetNaturalAffects(ICollector<Affect> affects) {
            affects.Add<Affects.Holy>();
            affects.Add(new Affects.OnCreatureSummon(DoSummon, AffectSummaryType.Local));
        }

        private static void DoSummon(Creature knight) {
            int dice = Game.Current.GetDiceNextValue();
            knight.Owner.HealBy(new DamageInfo(DamageType.Health, dice > 3 ? 2 : 1));
        }
    }
}
